<template>
  <div class="navigation_bar_contanier"
  v-show="isShow">
    <div class="navigation_bar_wrapper">
      <div class="navigation_bar_left_container"
      v-customShow="this.$router.routeStack.length>1"
      @click="onClickBack">
        <slot name="left"></slot>
      </div>
      <div class="navigation_bar_middle_container">
        <slot name="middle"></slot>
      </div>
      <div class="navigation_bar_right_container">
        <slot name="right"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  computed:{
    isShow:function(){
      return this.$route.meta.isShowNav;
    }
  },
  methods:{
    onClickBack(){
      this.$router.backRoute();
    }
  }
}
</script>

<style scoped>
.navigation_bar_contanier
{
  width: 100%;
  height: 3.2rem;
  position: fixed;
  left: 0px;
  top:0px;
  border-bottom: 1px solid black;
  background-color: white;
  z-index: 999;
}

.navigation_bar_wrapper
{
  width: 100%;
  height: 100%;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
}

.navigation_bar_left_container
{
  width: 20%;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.navigation_bar_middle_container
{
  width: 60%;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.navigation_bar_right_container
{
  width: 20%;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.navigation_bar_wrapper img
{
  width: 24px;
  height: 24px;
}

</style>